<?php

namespace App\Models;

use Dcat\Admin\Models\Administrator;
use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class MemberDoctor extends Model
{
    use HasDateTimeFormatter;
    protected $table = 'member_doctor';
    // public $timestamps = true;
    // protected $dateFormat = 'U';
    // const CREATED_AT = 'create_time';
    // const UPDATED_AT = 'update_time';

    protected $fillable = [
        'id',
        'agent',
    ];

    public function member()
    {
        return $this->belongsTo(Member::class, 'user_id', 'userid');
    }

    public function employee()
    {
        return $this->belongsTo(Administrator::class, 'agent', 'employee');
    }
}
